home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 30
/
PC Gamer IT CD 30 1-2.iso
/
MOTS
/
GAMEDATA
/
RESOURCE
/
JKMRES.GOO
/
cog_pow_keyyellow.cog
< prev
next >
Wrap
Text File
|
1998-02-25
|
2KB
|
92 lines
# Jedi Knight Cog Script
#
# POW_KEYYELLOW.COG
#
# POWERUP Script - Yellow Key
#
# [YB & CYW]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing powerup local
thing player local
int bin=48 local
sound pickupsnd=BactaPu1.wav local
flex amount local
message touched
message taken
message shutdown
message skill
end
# ========================================================================================
code
shutdown:
// Remove the key at end of level
player = GetLocalPlayerThing();
SetInv(player, bin, 0);
SetInvAvailable(player, bin, 0);
Return;
# ........................................................................................
touched:
player = GetSourceRef();
amount = GetInv(player, bin);
if (amount < GetInvMax(player, bin))
{
powerup = GetSenderRef();
TakeItem(powerup, player);
}
Return;
# ........................................................................................
taken:
player = GetSourceRef();
powerup = GetSenderRef();
// Print("Yellow Key");
jkPrintUNIString(player, bin);
// Do effects.
PlaySoundLocal(pickupsnd, 1, 0, 0);
AddDynamicTint(player, 0.0, 0.0, 0.2);
// Increment powerup amount.
ChangeInv(player, bin, 1.0);
SetInvAvailable(player, bin, 1);
Return;
# ........................................................................................
skill:
if (GetParam(0) == 24) // Force Pull
{
ReturnEx(0);
Return;
}
ReturnEx(-1);
Return;
end